Image processing apparatus, imaging apparatus, image processing method, and image processing program

ABSTRACT

A portable terminal includes an extraction unit and a display control unit. The extraction unit extracts a part of a display image displayed on a touch panel display, as an extraction image used as a compositing target image. The display control unit, in a case where a plurality of regions having different areas are included in the extraction image used as the compositing target image, removes at least one of the plurality of regions in order of area based on an operation amount of an operation input by a user.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application claims priority under 35 U.S.C. § 119 to Japanese Patent Application No., 2019-167364 filed on Sep. 13, 2019. The above application is hereby expressly incorporated by reference, in its entirety, into the present application.

BACKGROUND 1. Technical Field

The present disclosure relates to an image processing apparatus, an imaging apparatus, an image processing method, and an image processing program.

2. Description of the Related Art

In general, technologies for extracting a part of a display image as an extraction image from the display image are known. For example, WO2006/033178A discloses a technology for extracting an image as a compositing image from an extraction target image including a background image and an image of a non-background that is an extraction target based on a silhouette image used as a mask, and compositing the extracted compositing image in another background image.

In the technology disclosed in WO2006/033178A, separation between the background and the non-background (extraction target image) is performed based on a difference in pixel value between the background image and the extraction target image. In the technology disclosed in WO2006/033178A, superimposition of noise on the silhouette image is suppressed, and superimposition of noise on the extraction target image is suppressed by allowing a user to set a threshold value for separating the background and the non-background.

SUMMARY

However, in the technology disclosed in WO2006/033178A, noise that the user desires to remove may not be appropriately removed. For example, in a case where the difference in pixel value between the background image and the extraction target image varies depending on a part in which the extraction target image and the background image are in contact, separation between the background and the non-background may not be appropriately performed, and noise may be superimposed on the extraction target image. In the case of sufficiently removing the noise from the extraction target image in WO2006/033178A, an operation of the user for the removal may become complicated.

The present disclosure is conceived in view of the above matter, and an object thereof is to provide an image processing apparatus, an imaging apparatus, an image processing method, and an image processing program capable of improving operability of a user for removing noise included in an extraction image extracted from a display image and easily removing the noise.

In order to achieve the above object, an image processing apparatus of a first aspect of the present disclosure comprises an extraction unit that extracts a part of a display image displayed on a display unit, as an extraction image, and a display control unit that, in a case where a plurality of regions having different areas are included in the extraction image, removes at least one of the plurality of regions in order of area based on an operation amount of an operation input by a user.

According to the image processing apparatus of a second aspect of the present disclosure, in the image processing apparatus of the first aspect, a compositing unit that sets the extraction image displayed on the display unit as a compositing target image and generates a composite image in which the compositing target image is composited in a selection image selected by the user, is further comprised, in which the display control unit displays the composite image on the display unit.

According to the image processing apparatus of a third aspect of the present disclosure, in the image processing apparatus of the first aspect or the second aspect, the display control unit further displays an operation unit for allowing the user to input the operation on the display unit.

According to the image processing apparatus of a fourth aspect of the present disclosure, in the image processing apparatus of any one of the first aspect to the third aspect, the display control unit further removes a part or an entirety of a region as instructed by the user in the extraction image.

According to the image processing apparatus of a fifth aspect of the present disclosure, in the image processing apparatus of any one of the first aspect to the fourth aspect, the display control unit displays a specifying frame for specifying a partial region in the display image and a color designation mark for designating a reference color from colors included in an image in the specifying frame, in superposition with the display image, and the extraction unit extracts an image corresponding to the reference color designated by the color designation mark from the image in the specifying frame, as the extraction image.

According to the image processing apparatus of a sixth aspect of the present disclosure, in the image processing apparatus of the fifth aspect, the color designation mark is displayed in the specifying frame, and a relative positional relationship between the specifying frame and the color designation mark is predetermined.

According to the image processing apparatus of a seventh aspect of the present disclosure, in the image processing apparatus of the fifth aspect or the sixth aspect, a first reception unit that receives a size change instruction for enlarging or reducing the specifying frame, is further comprised, in which the display control unit performs control for changing a size of the specifying frame in accordance with the size change instruction received by the first reception unit.

According to the image processing apparatus of an eighth aspect of the present disclosure, in the image processing apparatus of any one of the fifth aspect to the seventh aspect, a second reception unit that receives a movement instruction for moving a position of the specifying frame, is further comprised, in which the display control unit performs control for moving the position of the specifying frame in accordance with the movement instruction received by the second reception unit.

According to the image processing apparatus of a ninth aspect of the present disclosure, in the image processing apparatus of any one of the fifth aspect to the eighth aspect, the display control unit further displays an indicator that has a larger area than the color designation mark and that represents the reference color.

According to the image processing apparatus of a tenth aspect of the present disclosure, in the image processing apparatus of any one of the fifth aspect to the ninth aspect, the extraction unit quantifies gradation of an entire image in the specifying frame and extracts an image in which a numerical value of gradation is within a reference color range including a numerical value of gradation to which the reference color corresponds, as the extraction image.

According to the image processing apparatus of an eleventh aspect of the present disclosure, in the image processing apparatus of the tenth aspect, a setting unit for allowing the user to set the reference color range, is further comprised.

An imaging apparatus of a twelfth aspect of the present disclosure comprises an imaging unit that images a subject, a display unit that displays an image captured by the imaging unit, and the image processing apparatus of any one of the first aspect to the eleventh aspect.

According to the imaging apparatus of a thirteenth aspect of the present disclosure, in the imaging apparatus of the twelfth aspect, live view display of a display image is performed on the display unit.

In order to achieve the above object, an image processing method executed by a computer of a fourteenth aspect of the present disclosure comprises extracting a part of a display image displayed on a display unit, as an extraction image, and in a case where a plurality of regions having different areas are included in the extraction image, removing at least one of the plurality of regions in order of area based on an operation amount of an operation input by a user.

In order to achieve the above object, an image processing program of a fifteenth aspect of the present disclosure causes a computer to execute a process, the process comprising extracting a part of a display image displayed on a display unit, as an extraction image, and in a case where a plurality of regions having different areas are included in the extraction image, removing at least one of the plurality of regions in order of area based on an operation amount of an operation input by a user.

An image processing apparatus of the present disclosure comprises a memory that stores a command to be executed by a computer, and a processor configured to execute the stored command, in which the processor extracts a part of a display image displayed on a display unit, as an extraction image, and removes at least one of a plurality of regions in order of area based on an operation amount of an operation input by a user in a case where the plurality of regions having different areas are included in the extraction image.

According to the present disclosure, the operability of the user for removing the noise included in the extraction image extracted from the display image is improved, and the noise can be easily removed.

BRIEF DESCRIPTION OF THE DRAWINGS

Exemplary embodiments according to the technique of the present disclosure will be described in detail based on the following figures, wherein:

FIG. 1 is a diagram illustrating one example of a state where a user performs imaging using a portable terminal that is one example of an imaging apparatus;

FIG. 2 is a diagram illustrating a summary of one example of an electric configuration of the portable terminal;

FIG. 3 is a function block diagram illustrating one example of a configuration of the portable terminal;

FIG. 4 is a diagram illustrating a display example of an indicator-included specifying frame;

FIG. 5 is a function block diagram illustrating one example of the configuration of the portable terminal;

FIG. 6 is a flowchart illustrating one example of composited imaging processing;

FIG. 7 is a diagram for describing movement of the specifying frame;

FIG. 8 is a diagram for describing enlarging and reducing of the specifying frame;

FIG. 9 is a flowchart illustrating one example of compositing target image extraction processing;

FIG. 10 is a diagram for describing processing of extracting a compositing target image from a specified region;

FIG. 11 is a diagram illustrating a state where live view display of a selection image composited with the compositing target image is performed;

FIG. 12 is a flowchart illustrating one example of compositing target image editing processing;

FIG. 13 is a diagram for describing a noise removal mode;

FIG. 14 is a diagram for describing the noise removal mode;

FIG. 15 is a diagram for describing the noise removal mode;

FIG. 16 is a diagram for describing the noise removal mode;

FIG. 17 is a diagram for describing an eraser mode;

FIG. 18 is a diagram for describing the eraser mode;

FIG. 19 is a diagram for describing the eraser mode;

FIG. 20 is a diagram for describing a color change mode;

FIG. 21 is a diagram illustrating one example of a case of changing a color of a text that is the compositing target image in the color change mode;

FIG. 22 is a diagram illustrating one example of a case of moving a display position of the text that is the compositing target image in a shape editing mode;

FIG. 23 is a diagram illustrating one example of a case of increasing a display size of the text that is the compositing target image in the shape editing mode;

FIG. 24 is a diagram illustrating one example of a case of rotating a display attitude of the text that is the compositing target image in the shape editing mode;

FIG. 25 is a diagram summarizing the composited imaging processing in the portable terminal of an embodiment;

FIG. 26 is a diagram for describing Modification Example 1;

FIG. 27 is a diagram for describing Modification Example 1;

FIG. 28 is a diagram for describing Modification Example 1;

FIG. 29 is a diagram for describing Modification Example 1; FIG. 30 is a diagram for describing Modification Example 2;

FIG. 31 is a diagram for describing Modification Example 2;

FIG. 32A is a diagram for describing Modification Example 3;

FIG. 32B is a diagram for describing Modification Example 3;

FIG. 32C is a diagram for describing Modification Example 3;

FIG. 32D is a diagram for describing Modification Example 3;

FIG. 32E is a diagram for describing Modification Example 3;

FIG. 32F is a diagram for describing Modification Example 3;

FIG. 33A is a diagram for describing Modification Example 4;

FIG. 33B is a diagram for describing Modification Example 4;

FIG. 34A is a diagram for describing Modification Example 5;

FIG. 34B is a diagram for describing Modification Example 5;

FIG. 35A is a flowchart illustrating one example of composited imaging processing of Modification Example 6;

FIG. 35B is a flowchart illustrating one example of the composited imaging processing of Modification Example 6;

FIG. 36A is a diagram for describing Modification Example 7;

FIG. 36B is a diagram for describing Modification Example 7; and

FIG. 37 is a diagram for describing Modification Example 8.

DETAILED DESCRIPTION

Hereinafter, an embodiment of the present disclosure will be described in detail with reference to the drawings. As illustrated in FIG. 1, for example, a portable terminal 10 is a smartphone. The portable terminal 10 functions as a mobile phone and also functions as a computer executing various application programs called apps or the like. The portable terminal 10 can also image photographs and is one example of an imaging apparatus.

An imaging unit 11 (refer to FIG. 2) that images a subject is incorporated in a main body of the portable terminal 10. A touch panel display 12 is disposed on a front surface of the main body of the portable terminal 10. The portable terminal 10 can perform live view display of sequentially displaying a captured image captured by the imaging unit 11 on the touch panel display 12 as a live view image.

In the live view display, for example, the imaging unit 11 outputs the captured image at a frame rate of 30 frames per second and updates the live view image displayed on the touch panel display 12 at the frame rate. Thus, the live view image of the live view display is visually recognized as a motion picture. Since the live view display of the subject is performed, a user U can perform imaging while checking composition of the subject and the captured image through display of the touch panel display 12.

As illustrated in FIG. 2 as one example, the portable terminal 10 comprises the imaging unit 11, the touch panel display 12, a central processing unit (CPU) 14, an operation switch 16, a work memory 17, a storage device 18, a media controller 19, an external interface (I/F) 21, and a communication unit 22. These units are communicably connected through a busline 23.

The CPU 14 functions as a main control unit 26 and a display control unit 31 by executing an operating system (not illustrated). The main control unit 26 generally controls each unit of the portable terminal 10. The display control unit 31 controls display of the touch panel display 12. The CPU 14 also functions as an image processing unit 32 that performs image processing on the image captured by the imaging unit 11.

The work memory 17 is a volatile memory that is used as a work area in a case where the CPU 14 executes various programs. A random access memory (RAM) is used as the work memory 17. The work memory 17 is also used as a memory for work in the case of performing the live view display and the image processing as described later.

The storage device 18 stores the operating system and also various programs such as an application program (AP) 27. Examples of the application program 27 include a photograph compositing application program, described later, and also image display software, a web browser, and a mail application program.

A user region 28 in which the user U stores data of the user such as image data representing the image captured using the portable terminal 10 is set in the storage device 18. The storage device 18 is a non-volatile memory such as a flash memory. A hard disk drive (HDD), a solid state drive (SSD), or the like may also be used as the storage device 18.

The touch panel display 12 is one example of a display unit displaying an operation screen that is stored in the storage device 18 and functions as a graphical user interface (GUI), the image captured by the imaging unit 11, and the like. The touch panel display 12 has a function of detecting a touch operation performed using a finger or the like of the user U and inputs an operation instruction into the main control unit 26 by detecting the touch operation. As is well known, the touch panel display 12 is configured with a display unit such as a liquid crystal display (LCD) or an organic electro-luminescence (EL) display and a touch panel unit of a resistive film type, an electrostatic capacitive type, or the like.

The operation switch 16 includes various mechanical operation units such as a multifunction key and a power button disposed in the main body of the portable terminal 10 and inputs the operation instruction into the main control unit 26.

The main control unit 26 is a reception unit that receives the input of the operation instruction from the touch panel display 12 and the operation switch 16.

The display control unit 31 performs control for displaying the operation screen, the image, and the like on the touch panel display 12 under control of the main control unit 26. The display control unit 31 performs processing or the like of converting data of the operation screen, the image, and the like into a video signal handled by the touch panel display 12 and outputs the video signal to the touch panel display 12.

The image processing unit 32 performs various types of image processing such as general image processing including brightness correction and compression and decompression processing, and also image extraction and image compositing, described later, on the captured image captured by the imaging unit 11.

The media controller 19 writes and reads out data with respect to attachable and detachable removable media such as a memory card 29.

The external I/F 21 is an interface such as a universal serial bus (USB) connector. A charging cable, a communication cable, a USB memory, or the like is connected to the external I/F 21.

The communication unit 22 has an antenna and a communication control circuit (none illustrated) and has a communication function of wireless communication, short range wireless communication, and the like through a mobile communication network and a wireless local area network (LAN).

The imaging unit 11 has, for example, an imaging lens 11A, an image sensor 11B, an analog-to-digital (AD) converter (A/D) 11C, an image input controller 11D, an image signal processing circuit 11E, a timing generator (TG) 11F, and a driver 11G.

The imaging lens 11A forms a subject image on an imaging surface of the image sensor 11B by condensing light from the subject. The image sensor 11B photoelectrically converts subject light imaged by an imaging element and outputs the subject light as an analog image signal. For example, a charge coupled device (CCD) image sensor or a complementary metal oxide semiconductor (CMOS) image sensor is used as the image sensor 11B. In the case of performing the live view display, the image sensor 11B sequentially outputs the analog image signal at a preset frame rate.

The AD converter 11C converts the analog image signal from the image sensor 11B into a digital image signal. The image input controller 11D records the digital image signal input from the AD converter 11C in the work memory 17 as the captured image. While live view imaging is performed, the image input controller 11D records the captured image in the work memory 17 as a live view image. In the work memory 17, the live view image is used in the live view display and is sequentially updated in accordance with the frame rate of the image sensor 11B.

The image signal processing circuit 11E performs various types of signal processing such as white balance processing, gamma-correction processing, and YC conversion processing on the captured image recorded in the work memory 17 by the image input controller 11D. The white balance processing is processing of adjusting white balance by adjusting a gain of each image signal of red (R), green (G), and blue (B) included in the captured image. The gamma-correction processing is gradation transformation processing performed on the image signal in accordance with prestored gamma characteristics. The YC processing is processing of converting the image signals of R, G, and B into a brightness signal Y and color difference signals Cr and Cb. The captured image processed by the image signal processing circuit 11E is written back to the work memory 17.

The timing generator 11F generates a timing signal prescribing an operation timing of the image sensor 11B under control of the main control unit 26. The driver 11G drives the image sensor 11B based on the timing signal from the timing generator 11F.

In a case where the portable terminal 10 functions as the imaging apparatus by operating the imaging unit 11, the display control unit 31 performs control for performing the live view display of the captured image captured by the imaging unit 11 on the touch panel display 12 as a live view image. For example, the live view display is started at the same time as the start of the imaging unit 11. The live view display is temporarily stopped while an image storage operation in response to the operation of a shutter button is executed, but is basically continued until the operation of the imaging unit 11 is finished.

More specifically, the imaging unit 11 sequentially outputs the captured image at the frame rate, and the captured image is output to the work memory 17. The captured image is subjected to signal processing by the image signal processing circuit 11E and then, is recorded in the work memory 17. In the live view display, the captured image is recorded in the work memory 17 as a live view image and is sequentially updated at the frame rate. The display control unit 31 implements the live view display by reading out the live view image sequentially updated in the work memory 17 and sequentially updating the display of the touch panel display 12. Imaging performed for the live view display by the imaging unit 11 will be referred to as the live view imaging.

During the live view display, an image storage instruction is input in a case where the shutter button is operated by the user U. In a case where the image storage instruction is input, the captured image captured at the timing is stored at a preset storage destination in the user region 28 of the storage device 18 or the memory card 29. In the case of recording the captured image in the memory card 29, the image processing unit 32 performs recording through the media controller 19.

The captured image for storage may be an image recorded in the work memory 17 to be used as a live view image or an image newly acquired by the imaging unit 11 at the timing of operation of the shutter button.

The photograph compositing application program that performs the live view display by performing image compositing on the live view image is installed on the portable terminal 10 as one application program 27. For example, the photograph compositing application program extracts a part of a display image as a compositing target image while the live view display of the display image as a live view image is performed. A function of generating a composite image in which an extracted compositing target image 54 is composited with a selection image different from the display image, and performing the live view display of the generated composite image as a live view image is implemented in the portable terminal 10.

The photograph compositing application program of the present embodiment is one example of an image processing program according to the present disclosure, and the portable terminal 10 of the present embodiment functions as one example of an image processing apparatus according to the present disclosure by operating the photograph compositing application program. A configuration related to the function of the portable terminal 10 corresponding to the operation of the photograph compositing application program will be described with reference to FIG. 3 to FIG. 5.

First, a function related to preprocessing of photograph compositing in the portable terminal 10 will be described with reference to FIG. 3 and FIG. 4. In a case where the photograph compositing application program is started, the CPU 14 functions as the display control unit 31 and the image processing unit 32.

As illustrated in FIG. 3, regions functioning as an image memory 17A and a video random access memory (VRAM) 17B are set in the work memory 17. The image memory 17A is a region in which the captured image output from the imaging unit 11 is temporarily recorded as a live view image. The VRAM 17B is a region in which the live view image subjected to image processing in the image processing unit 32 is recorded.

In a case where the photograph compositing application program is started, the imaging unit 11 starts the live view imaging of a display image 50. The display image 50 is recorded in the image memory 17A as a live view image. The display image 50 in the image memory 17A is sequentially updated to the most recent captured image that is output in accordance with the frame rate of the imaging unit 11. The display image 50 is the live view image captured by the imaging unit 11 and is an image of an extraction source of the compositing target image 54 (refer to FIG. 5).

The display image 50 is read out from the image memory 17A by the image processing unit 32. The display image 50 is subjected to image processing such as the brightness correction by the image processing unit 32 and then, is recorded in the VRAM 17B. The display control unit 31 reads out the display image 50 of the live view image from the VRAM 17B and performs the live view display of the display image 50 on the touch panel display 12.

In the storage device 18, data of an indicator-included specifying frame 60 and a color designation mark 62 is recorded as data to be used by the photograph compositing application program as the application program 27.

In the case of performing the live view display of the display image 50, as illustrated in FIG. 4, the display control unit 31 displays the indicator-included specifying frame 60 and the color designation mark 62 on the touch panel display 12 in superposition with the display image 50 as a GUI for extracting the compositing target image 54 in the display image 50.

FIG. 4 illustrates one example of a state where the display control unit 31 displays the indicator-included specifying frame 60 and the color designation mark 62 in superposition with the display image 50 displayed on the touch panel display 12 of the portable terminal 10. The indicator-included specifying frame 60 is a GUI used by the user U in order for the user to specify a range within which the compositing target image 54 is to be extracted from the display image 50. A region specified by the indicator-included specifying frame 60 is a specified region 52, and a part of the specified region 52 is extracted as the compositing target image 54. As illustrated in FIG. 4, the indicator-included specifying frame 60 of the present embodiment includes an indicator 60A, a specifying frame 60B, and an enlarging and reducing instruction mark 60C. The specifying frame 60B of the indicator-included specifying frame 60 of the present embodiment is one example of a specifying frame for specifying a partial region in a display image according to the present disclosure. The indicator 60A of the indicator-included specifying frame 60 of the present embodiment is one example of an indicator representing a reference color according to the present disclosure. The specified region 52 of the present embodiment is one example of the partial region in the display image according to the present disclosure and is one example of an image in the specifying frame according to the present disclosure.

As illustrated in FIG. 4, a region surrounded by the specifying frame 60B is the specified region 52. In the present embodiment, the size of the specifying frame 60B can be increased and decreased. In other words, the user U can change the size (range) of the specified region 52. As one example, in the present embodiment, the specifying frame 60B is enlarged or reduced by allowing the user U to operate the enlarging and reducing instruction mark 60C. In a case where the main control unit 26 receives an operation instruction for enlarging or reducing the specifying frame 60B, the main control unit 26 outputs information about the received operation instruction to the display control unit 31. The operation instruction for enlarging or reducing the specifying frame 60B of the present embodiment is one example of a size change instruction for changing the size of the specifying frame 60B according to the present disclosure. The display control unit 31 changes the specifying frame 60B to a size corresponding to the information about the operation instruction input from the main control unit 26. In this case, the main control unit 26 of the present embodiment is one example of a first reception unit according to the present disclosure. While the specifying frame 60B can be enlarged and reduced in the present embodiment as one example, a form of enabling at least one of enlarging or reducing may be available.

In the present embodiment, the specifying frame 60B can be moved. In other words, the user U can change the position of the specifying frame 60B with respect to the display image 50. In a case where the main control unit 26 receives an operation instruction for moving the specifying frame 60B, the main control unit 26 outputs information about the received operation instruction to the display control unit 31. The operation instruction for moving the specifying frame 60B of the present embodiment is one example of a movement instruction for moving the position of the specifying frame 60B according to the present disclosure. The display control unit 31 moves the indicator-included specifying frame 60 to a position corresponding to the information about the operation instruction input from the main control unit 26. In this case, the main control unit 26 of the present embodiment is one example of a second reception unit according to the present disclosure.

As illustrated in FIG. 4, the color designation mark 62 is displayed in the specifying frame 60B. In the present embodiment, a relative positional relationship between the specifying frame 60B and the color designation mark 62 is predetermined. As one example, in the present embodiment, the position of the color designation mark 62 is set as the position of the center (centroid) of the specifying frame 60B. The color designation mark 62 is an image representing a mark for designating the reference color from the color of an image in the specified region 52. The color designation mark 62 of the present embodiment is one example of a color designation mark according to the present disclosure. As one example, the color designation mark 62 of the present embodiment is a mark having a shape of a circular ring surrounding the display image 50, and the color of the display image 50 inside the circular ring is designated as the reference color.

The indicator 60A has a larger area than the color designation mark 62 and displays the reference color designated by the color designation mark 62.

Next, a function related to composited imaging processing in the portable terminal 10 will be described with reference to FIG. 5. In a case where the photograph compositing application program is started, the CPU 14 functions as an extraction unit 32A and a compositing unit 32B of the image processing unit 32.

The extraction unit 32A extracts a part of the display image 50 as the compositing target image 54 to be composited with an image. Specifically, the extraction unit 32A extracts the compositing target image 54 from the specified region 52 specified from the display image 50. More specifically, the extraction unit 32A extracts an image corresponding to the reference color designated by the color designation mark 62 from the specified region 52 specified by the specifying frame 60B of the indicator-included specifying frame 60 as the compositing target image 54. Examples of the image used as the compositing target image 54 include an image representing a mark or a character string. The mark includes at least one of a text, a figure, a pattern, or a combination of two or more selected from the text, the figure, and the pattern. The text is a concept including a number and a symbol. The mark includes a logo indicating a company name, a product name, a store name, a station name, a place name, or the like. The pattern includes a streak pattern, a checkered pattern, a dotted pattern, and the like. The mark also includes a mark configured with one character of any of a text, a number, or a symbol.

The character string includes a message configured with a handwritten text or a printed text, a traffic safety slogan, a greeting text for welcome and farewell at a tourist place, an advertising text for a product, and the like. For example, the message is a phrase for delivering feelings toward a specific person like “thank you for the other day” or “congratulations on admission to school” and includes a congratulatory phrase, a phrase of gratitude, a greeting text, and the like.

Besides, a seal or an imprint of a stamp or the like provided to a tourist at a tourist attraction is also included in the mark. A red seal or the like that is a seal or an imprint provided to a worshiper at a temple or a shrine is also included in any of the mark or the character string. The text included in the mark or the character string is not limited to Japanese and may be in foreign languages such as English, Chinese, and Korean.

The extraction unit 32A extracts the region of the image corresponding to the reference color as the compositing target image 54 based on the contrast of the image in the specified region 52. In a case where the compositing target image 54 is extracted from the display image 50, the extracted compositing target image 54 is recorded in the image memory 17A.

The imaging unit 11 starts the live view imaging of a selection image 56 in a state where the compositing target image 54 is stored in the image memory 17A. The selection image 56 is recorded in the image memory 17A as a live view image. The live view display of the selection image 56 is started on the touch panel display 12. The selection image 56 is the live view image captured by the imaging unit 11 and is an image of a compositing destination in which the compositing target image 54 is composited.

The compositing unit 32B generates a composite image in which the selection image 56 and the compositing target image 54 are composited. The selection image 56 in which the compositing target image 54 is composited is recorded in the VRAM 17B as the composite image. The display control unit 31 starts the live view display of the selection image 56 in which the compositing target image 54 is composited as the composite image.

The main control unit 26 receives an editing instruction for the compositing target image 54 in the touch panel display 12 based on an operation instruction input through the touch panel display 12. The editing instruction received by the main control unit 26 is input into the display control unit 31 or the compositing unit 32B. The display control unit 31 or the compositing unit 32B edits the compositing target image 54 based on the input editing instruction.

In the same manner as the case of normal imaging, during the live view display of the selection image 56 in which the compositing target image 54 is composited, the image storage instruction is input in a case where the shutter button is operated by the user U. In a case where the image storage instruction is input, the selection image 56 in which the compositing target image 54 is composited is stored at the timing at a preset storage destination in the user region 28 of the storage device 18 or the memory card 29 as a composite image for storage. As one example, in the present embodiment, a composite image that is compressed by performing compression processing on the composite image by the image processing unit 32 is recorded at the preset storage destination.

An effect of the above configuration will be described with reference to FIG. 1, FIG. 4, and FIG. 6 to FIG. 15.

As described above, FIG. 1 illustrates a scene in which the user U performs imaging using the portable terminal 10. The scene illustrated in FIG. 1 is a zoo where the user U visits together with a friend T and a “panda” is present. A text 82 of “JAPANDA”, a wavy line 83, and a polka dot 84 are printed on a shirt 80 worn by the friend T. In the present example, an example in which the user U thinks of imaging a composite photograph in which two subjects including the “panda” and the text 82 of “PANDA” in “JAPANDA” are combined based on similarity in nuance between the “panda” and “JAPANDA” and performs the imaging at the location using the portable terminal 10 will be described.

As illustrated in FIG. 6, in the portable terminal 10, in a case where the photograph compositing application program is started, the portable terminal 10 transitions to a composited imaging mode and executes the composited imaging processing. In a case where the composited imaging processing is started, first, in step S100, the display control unit 31 performs the live view display of the display image 50 on the touch panel display 12. Specifically, the live view display of the display image 50 is started in the touch panel display 12 by starting the live view imaging of the display image 50 in the imaging unit 11.

Next, in step S102, as illustrated in FIG. 4, the display control unit 31 displays the indicator-included specifying frame 60 and the color designation mark 62 on the touch panel display 12 in superposition with the display image 50 of the live view display.

In a case where the indicator-included specifying frame 60 and the color designation mark 62 are displayed, the user U performs an adjustment to a state where the text 82 desired to be extracted falls in the specifying frame 60B. In the portable terminal 10 of the present embodiment, the color of the text 82 desired to be extracted is set as the reference color. Thus, the user U adjusts the position of the color designation mark 62 to a position overlaid on the image of the color of the text 82 desired to be extracted. For example, the user U performs an adjustment to a state where the color designation mark 62 is overlaid on the text 82 desired to be extracted. Examples of a method of performing the adjustments include a method of adjusting an imaging range, that is, the subject captured in the display image 50, by allowing the user U to move the portable terminal 10. Examples of the method of performing the adjustments also include an adjustment method by moving the specifying frame 60B (specified region 52) and an adjustment method by enlarging or reducing the specifying frame 60B (specified region 52).

Therefore, next, in step S104, as described above, the main control unit 26 determines whether or not the operation instruction for moving the specifying frame 60B is received. As one example, in the present embodiment, the operation instruction of the user U for moving the specifying frame 60B is provided by allowing the user U to perform a gesture of sliding a finger toward a desired direction of movement in a state where the user U touches the specifying frame 60B displayed on the touch panel display 12 using one finger. Such a gesture is referred to as a swipe or the like.

In a case where the main control unit 26 does not receive the operation instruction for moving the specifying frame 60B, the determination in step S104 results in a negative determination, and a transition is made to step S108. In a case where the main control unit 26 receives the operation instruction for moving the specifying frame 60B, the determination in step S104 results in a positive determination, and a transition is made to step S106.

In step S106, the display control unit 31 moves the specifying frame 60B to a position corresponding to the operation instruction for moving the specifying frame 60B. Specifically, coordinate information representing the specifying frame 60B after movement is output to the display control unit 31 from the main control unit 26 as information about the operation instruction. The display control unit 31 displays the specifying frame 60B at a position corresponding to the coordinate information input from the main control unit 26.

FIG. 7 illustrates one example of display of the moved specifying frame 60B. In the example illustrated in FIG. 7, one example of a state where the position of the specifying frame 60B, more specifically, the position of the specifying frame 60B with respect to the display image 50, is moved downward (closer to the operation switch 16) compared to the example illustrated in FIG. 4 is illustrated.

Next, in step S108, as described above, the main control unit 26 determines whether or not the operation instruction for enlarging or reducing the specifying frame 60B is received. As one example, in the present embodiment, the operation instruction of the user U is provided by allowing the user U to perform a gesture of sliding the finger toward a direction corresponding to a size to which enlarging or reducing is desired in a state where the user U touches the enlarging and reducing instruction mark 60C displayed on the touch panel display 12 using one finger. A method of providing the operation instruction for enlarging or reducing the specifying frame 60B is not limited to the present embodiment and may be, for example, a method of providing the operation instruction by allowing the user U to perform a gesture of pinching in or pinching out the specifying frame 60B or the specified region 52 displayed on the touch panel display 12. Pinching out is a gesture of increasing an interval between two fingers in a state where a display screen is touched using two fingers on the touch panel display 12. In a case where pinching out is performed in a state where the top and the bottom or the left and the right of the specifying frame 60B or the specified region 52 are touched using two fingers, the specifying frame 60B is enlarged, and the area of the specified region 52 is increased. Contrary to pinching out, pinching in is a gesture of decreasing the interval between two fingers. In a case where pinching in is performed, the specifying frame 60B is decreased, and the area of the specified region 52 is decreased.

In a case where the main control unit 26 does not receive the operation instruction for enlarging or reducing the specifying frame 60B, the determination in step S108 results in a negative determination, and a transition is made to step S112. In a case where the main control unit 26 receives the operation instruction for enlarging or reducing the specifying frame 60B, the determination in step S108 results in a positive determination, and a transition is made to step S110.

In step S110, the display control unit 31 changes the size of the specifying frame 60B to a size corresponding to the operation instruction for enlarging or reducing the specifying frame 60B. The size of the specified region 52 is also changed by changing the size of the specifying frame 60B. Specifically, coordinate information representing the specifying frame 60B after enlarging or reducing is output to the display control unit 31 from the main control unit 26 as information about the operation instruction. The display control unit 31 displays the specifying frame 60B in a size (position) corresponding to the coordinate information input from the main control unit 26.

FIG. 8 illustrates one example of display of the specifying frame 60B of which the size is changed. In the example illustrated in FIG. 8, a state where the size of the specifying frame 60B is decreased compared to the example illustrated in FIG. 7 is illustrated.

The user U of the present embodiment desires to extract only the text 82 of “PANDA” in the text 82 of “JAPANDA”. Thus, as described above, the user U adjusts the specifying frame 60B to a state where only the text 82 of “PANDA” in the text 82 of “JAPANDA” falls in the specifying frame 60B and the text 82 of “JA” is outside the specifying frame 60B as illustrated in FIG. 7. In addition, as described above, the user U adjusts the specifying frame 60B to a state where the reference color designated by the color designation mark 62 is the color of the text 82, in the present example, a state where the color designation mark 62 is overlaid on the text 82, by referring to the color of the indicator 60A. In the example illustrated in FIG. 4, the reference color designated by the color designation mark 62 is different from the color of the text 82 as illustrated by the indicator 60A. Thus, such an example is not preferred. In addition, in the example illustrated in FIG. 8, the text 82 included in the specifying frame 60B is only the text 82 of “NDA”. Thus, the text 82 of “PA” is not extracted, and such an example is not preferred. Meanwhile, in the example illustrated in FIG. 7, the text 82 of “PANDA” is included in the specifying frame 60B, and the text 82 of “JA” is not included. In addition, the color designation mark 62 is overlaid on the text 82, and a state where the color of the text 82 is designated by the color designation mark 62 is set as illustrated by the indicator 60A. Thus, such an example is preferred. Accordingly, the user U adjusts the relationship between the display image 50 and the indicator-included specifying frame 60 to the state illustrated in FIG. 7.

In the present embodiment, in a case where adjustment of the position and the size of the specifying frame 60B, the position of the color designation mark 62, and the like is completed, an extraction instruction of the user U for the compositing target image 54 is provided by performing an operation of tapping a shutter button 70 displayed on the touch panel display 12 as a GUI using a finger. In the present embodiment, the extraction unit 32A extracts an extraction image from the specified region 52 specified by the specifying frame 60B in response to the extraction instruction of the user U for the compositing target image 54. The compositing unit 32B generates the composite image by compositing the extraction image displayed on the touch panel display 12 as the compositing target image 54 with the selection image 56. Since the extraction image displayed on the touch panel display 12 is the compositing target image 54, the extraction image will be referred to as the compositing target image 54 below.

Therefore, next, in step S112, the main control unit 26 determines whether or not the extraction instruction for the compositing target image 54 is received. In a case where the main control unit 26 does not receive the extraction instruction for the compositing target image 54, the determination in step S112 results in a negative determination, and a return is made to step S104 to repeat processing of steps S104 to S110. In a case where the main control unit 26 receives the extraction instruction for the compositing target image 54, the determination in step S112 results in a positive determination, and a transition is made to step S114.

In step S114, the compositing target image 54 is extracted from the specified region 52 of the display image 50 by compositing target image extraction processing illustrated in FIG. 9 as one example.

In step S150 illustrated in FIG. 9, the extraction unit 32A specifies the specified region 52 from the display image 50. Specifically, as described above, in a case where the extraction instruction is provided by allowing the user U to operate the shutter button 70, the main control unit 26 outputs the coordinate information corresponding to the position of the specifying frame 60B to the extraction unit 32A. The extraction unit 32A specifies the specified region 52 from the display image 50 based on the coordinate information input from the main control unit 26.

Next, in step S152, the extraction unit 32A converts the entire specified region 52 into a gray scale. Specifically, the extraction unit 32A temporarily performs gradation transformation of the colors of all pixels included in the specified region 52 into pixel values of a gray scale of white to black represented by pixel values of 256 levels of 0 to 255.

A method of performing gradation transformation of the color of each pixel into the gray scale is not particularly limited, and existing technologies can be applied. For example, in a case where the specified region 52 is an RGB image, a gray scale pixel value Gray is obtained from a pixel value of Red (R: red), a pixel value of Green (G: green), and a pixel value of Blue (B: blue) in each pixel using Expression (1) below. Gray=Red×0.3+Green×0.59+Blue×0.11  (1)

FIG. 10 illustrates an example in which the image of the specified region 52 is converted into the gray scale. The specified region 52 illustrated in FIG. 10 corresponds to the specified region 52 specified by the indicator-included specifying frame 60 in the state illustrated in FIG. 7. In the specified region 52 illustrated in FIG. 10, the friend T, a background B, the shirt 80, and the text 82 are captured as subjects, and an image of each thereof is included.

Next, in step S154, the extraction unit 32A determines whether or not the reference color is white. As one example, in the present embodiment, a pixel of which the gray scale pixel value in step S152 is 0 to 127 is regarded as a black pixel, and a pixel of which the pixel value is 128 to 255 is regarded as a white pixel. That is, in the present embodiment, the color of the pixel of the gray scale specified region 52 is converted into any of white or black of two values.

In a case where the pixel value of a pixel set as the reference color, specifically, the pixel value of the pixel of the display image 50 surrounded by the color designation mark 62, is any of 128 to 255, the extraction unit 32A determines that the reference color is white. In a case where the reference color is white, the determination in step S154 results in a positive determination, and a transition is made to step S156. In this case, the range within which the pixel value is 128 to 255 in the present embodiment is one example of a reference color range including a numerical value of gradation to which the reference color corresponds according to the present disclosure.

In step S156, the extraction unit 32A extracts the region of the white pixels, that is, pixels of which the pixel values are 128 to 255, in the specified region 52 as the compositing target image 54.

In a case where the pixel value of the pixel set as the reference color, specifically, the pixel value of the pixel of the display image 50 surrounded by the color designation mark 62, is any of 0 to 127, the extraction unit 32A determines that the reference color is black. In a case where the reference color is black, the determination in step S154 results in a negative determination, and a transition is made to step S158. In this case, the range within which the pixel value is 0 to 127 in the present embodiment is one example of the reference color range including the numerical value of gradation to which the reference color corresponds according to the present disclosure.

In step S158, the extraction unit 32A extracts the region of the black pixels, that is, pixels of which the pixel values are 0 to 127, in the specified region 52 as the compositing target image 54.

In the example illustrated in FIG. 10, the pixel value of the pixel of each of a text 82A of “P”, a text 82B of “A”, a text 82C of “N”, a text 82D of “D”, a text 82E of “A”, the wavy line 83, and the polka dot 84 in the gray scale image of the specified region 52 is within the range of 0 to 127. Thus, it is determined that the text 82 is a black pixel. Meanwhile, the pixel value of the pixel of each of the friend T, the background B, and the shirt 80 is within the range of 128 to 255 and is determined as a white pixel.

Accordingly, in the example of the present embodiment, as illustrated in FIG. 10, the extraction unit 32A determines that the reference color is black, and each of the text 82, the wavy line 83, and the polka dot 84 is extracted from the specified region 52 as the compositing target image 54. Specifically, each image of the text 82A of “P”, the text 82B of “A”, the text 82C of “N”, the text 82D of “D”, and the text 82E of “A” which are the text 82 is extracted from the specified region 52 as the compositing target image 54. As the wavy line 83, an image of each of three wavy lines is extracted from the specified region 52 as the compositing target image 54. As the polka dot 84, an image of each of a plurality of dots is extracted from the specified region 52 as the compositing target image 54. The extraction unit 32A handles the text 82A of “P”, the text 82B of “A”, the text 82C of “N”, the text 82D of “D”, the text 82E of “A”, the three wavy lines, and the plurality of dots as one compositing target image 54.

In a case where processing of step S156 or processing of step S158 is finished, the compositing target image extraction processing is finished. By finishing the compositing target image extraction processing, step S114 of the composited imaging processing is finished, and a transition is made to step S116.

In a case where the compositing target image 54 is extracted, in step S116, the imaging unit 11 immediately starts the live view imaging of the selection image 56.

In a case where the live view imaging of the selection image 56 is started, next, in step S118, the compositing unit 32B composites the extracted compositing target image 54 in the selection image 56. In the present embodiment, an image other than the compositing target image 54 in the specified region 52 is handled as a transparent image.

Next, in step S120, the display control unit 31 performs the live view display of the selection image 56 in which the compositing target image 54 is composited on the touch panel display 12. In addition, the display control unit 31 displays a noise removal button 90, an eraser button 92, a color change button 94, and a shape editing button 96 on the selection image 56 as editing tools for allowing the user to edit the composite image.

FIG. 11 illustrates a state where the live view display of the current selection image 56 in which the text 82, the wavy line 83, and the polka dot 84 used as the compositing target image 54 are composited is performed. As illustrated in FIG. 11, in the case of performing the live view display of the selection image 56 in which the compositing target image 54 is composited, the display control unit 31 displays the compositing target image 54 at the center of the selection image 56, that is, the center of the display screen of the touch panel display 12, in an initial state. Furthermore, as illustrated in FIG. 11, for example, the display control unit 31 displays the noise removal button 90, the eraser button 92, the color change button 94, and the shape editing button 96 as the editing tools and the shutter button 70 at a lower position on the display screen of the touch panel display 12 as a GUI. The shutter button 70 is an operation button for inputting the image storage instruction and is an operation button for storing the selection image 56 in which the compositing target image 54 is composited as a composite image.

The user U decides the composition of the selection image 56 and a relative positional relationship between the image of the subject and the compositing target image 54 in the selection image 56 while seeing the live view display of the selection image 56 in which the compositing target image 54 is composited.

Specifically, as illustrated in FIG. 11, the user U considers imaging a composite photograph in which the text 82 of “PANDA” and the “panda” are combined. Thus, the user U adjusts the position and the direction of the portable terminal 10 such that the “panda” is captured as the subject of the selection image 56. The position, the size, the angle of view, and the like of the “panda” in the selection image 56 are adjusted. By performing such an operation, the user U decides the composition of the selection image 56.

The user U edits the compositing target image 54 in the selection image 56 in parallel with decision of the composition of the selection image 56. In the case of editing the compositing target image 54, the user U touches any of the noise removal button 90, the eraser button 92, the color change button 94, and the shape editing button 96, which are the editing tools, using one finger in accordance with a desired editing content. In a case where the noise removal button 90, the eraser button 92, the color change button 94, and the shape editing button 96 are touched, the editing instruction is input into the main control unit 26.

In step S122, the main control unit 26 determines whether or not to edit the compositing target image 54 in the selection image 56. In a case where the editing instruction of the user U provided by operating the editing tools is not input in a predetermined time period from a transition to step S122, the determination in step S122 results in a negative determination, and a transition is made to step S126. In a case where the editing instruction of the user U provided by operating the editing tools is input in the predetermined time period from the transition to step S122, the determination in step S122 results in a positive determination, and a transition is made to step S124.

In step S124, the compositing target image 54 is edited by compositing target image editing processing illustrated in FIG. 12 as one example. As illustrated in FIG. 11, in the initial state, the text 82, the wavy line 83, and the polka dot 84 are displayed on the selection image 56 as the compositing target image 54. As described above, the user U of the present embodiment desires to set the text 82 of “PANDA” as the compositing target image 54 and exclude the wavy line 83 and the polka dot 84 from the compositing target image 54. In such a case, the user U performs an operation of removing the wavy line 83 and the polka dot 84 from the compositing target image 54 by operating the noise removal button 90 or the eraser button 92.

In step S200 illustrated in FIG. 12, the main control unit 26 determines whether or not the received editing instruction is an editing instruction provided by operating the noise removal button 90. In the case of the editing instruction provided by operating the noise removal button 90, step S200 results in a positive determination, and a transition is made to step S202. In this case, the portable terminal 10 is set to a noise removal mode. In the noise removal mode, the display control unit 31 removes a plurality of regions in the compositing target image 54 displayed on the touch panel display 12 from the compositing target image 54 for each region. While described in detail later, the “region” refers to a cluster of consecutive pixels. A method of specifying the region from the compositing target image 54 by the display control unit 31 is not particularly limited. For example, a so-called lasso tool in image processing can be applied. In the case of a form in which pixels constituting the region includes pixels constituting a non-region like the alphabet character “0” or the like, the pixels constituting the non-region surrounded by the pixels constituting the region may be regarded as pixels constituting the present region. For example, in the case of the alphabet character “0”, a circular ring region may be employed as a region corresponding to the character “0”, or a region of a so-called filled circular shape may be employed.

In step S202, the display control unit 31 displays a noise removal tool 91 on the selection image 56 as illustrated in FIG. 13. The noise removal tool 91 includes a slider bar 91A and a slider 91B.

The user U changes the position of the slider 91B by performing a gesture of sliding a finger along the slider bar 91A in a state where the user U touches the slider 91B using one finger. In a case where a plurality of regions having different areas are included in the compositing target image 54, the display control unit 31 removes at least one of the plurality of regions in order of area based on the operation amount of the slider 91B in a case where the position of the slider 91B is changed. In the example illustrated in FIG. 13, the display control unit 31 sequentially removes the plurality of regions in the compositing target image 54 displayed on the touch panel display 12 in order from a region having the smallest area in accordance with a movement amount in which the position of the slider 91B is moved from a left side to a right side. In the present embodiment, even in a case where the regions of the compositing target image 54 are temporarily removed, the removed regions can be restored until the noise removal mode is finished. As one example, in the present embodiment, in the case of restoring the removed regions, the user U sequentially restores the regions in order from the largest area in contrast to removal by moving the position of the slider 91B from the right side to the left side, that is, in the opposite direction to the case of removal, along the slider bar 91A. The “area” of the region corresponds to the number of pixels of the image of the region.

In the example illustrated in FIG. 13, a plurality of regions including the text 82, the wavy line 83, and the polka dot 84 are included in the compositing target image 54. In the text 82 of “PANDA”, each image of the text 82A of “P”, the text 82B of “A”, the text 82C of “N”, the text 82D of “D”, and the text 82E of “A” having different areas is one region. That is, the text 82 includes five regions, and the number of regions having different areas is four. In addition, each image of the three wavy lines included in the wavy line 83 is one region. That is, the wavy line 83 includes three regions, and the number of regions having different areas is one. Furthermore, each image of the plurality of dots included in the polka dot 84 is one region. That is, the polka dot 84 includes the same number of regions as the plurality of dots, and the number of regions having different areas is one.

In the present embodiment, in the case of removing noise using the noise removal tool 91, the entire compositing target image 54 can be enlarged. For example, in a case where noise is small and is difficult to see, the user U can make the noise included in the compositing target image 54 easy to see by increasing the display size of the compositing target image 54.

Therefore, next, in step S204, the main control unit 26 determines whether or not to increase the display size of the compositing target image 54. In the case of increasing the display size, for example, the editing instruction is provided by a gesture of pinching out performed by the user U using two fingers.

In a case where the main control unit 26 does not receive the editing instruction for increasing the display size of the compositing target image 54, the determination in step S204 results in a negative determination, and a transition is made to step S208. In a case where the main control unit 26 receives the editing instruction for increasing the display size of the compositing target image 54, the determination in step S204 results in a positive determination, and a transition is made to step S206. Information representing the editing instruction received by the main control unit 26 is output to the display control unit 31.

In step S206, the display control unit 31 changes the display size of the compositing target image 54 to a size corresponding to the information representing the editing instruction input from the main control unit 26. Accordingly, in a case where pinching out is performed in a state where the user U touches the top and the bottom or the left and the right of the compositing target image 54 using two fingers, the display size of the compositing target image 54 is increased.

Next, in step S208, the main control unit 26 determines whether or not the slider 91B is operated. In a case where the slider 91B is not operated by the user U in a predetermined time period from the transition to step S122, the determination in step S208 results in a negative determination, and a transition is made to step S216. In a case where the slider 91B is operated by the user U in the predetermined time period from the transition to step S122, the determination in step S208 results in a positive determination, and a transition is made to step S210.

In step S210, the display control unit 31 determines whether or not the slider 91B is moved in the rightward direction. That is, a determination as to whether or not the editing instruction for removing the plurality of regions included in the compositing target image 54 is provided by the slider 91B is performed. In the present embodiment, information representing the position of the slider 91B, that is, coordinate information representing the position of the slider 91B, is input into the display control unit 31 from the main control unit 26 as information about the editing instruction. The display control unit 31 derives the movement direction and the movement amount of the slider 91B based on the coordinate information representing the position of the slider 91B.

In a case where the slider 91B is moved in the rightward direction, the determination in step S210 results in a positive determination, and a transition is made to step S212.

In step S212, the display control unit 31 sequentially removes at least one of the plurality of regions included in the compositing target image 54 in order of area based on the operation amount of the user U, in other words, the movement amount of the slider 91B.

As one example, the display control unit 31 of the present embodiment divides the maximum value of the movement amount of the slider 91B, that is, the movement amount (hereinafter, referred to as the maximum movement amount) in a case where the slider 91B is moved from the right end to the left end of the slider bar 91A, by a value obtained by subtracting one from the number of regions having different areas. In the example illustrated in FIG. 13, as described above, the number of regions having different areas is four in the text 82, one in the wavy line 83, and one in the polka dot 84. Thus, the number of regions having different areas is six in the entire compositing target image 54. Thus, the display control unit 31 sets a value obtained by dividing the maximum movement amount by a number obtained by subtracting one from six, that is, five, as a threshold value of the movement amount for removing the regions. Each time the movement amount of the slider 91B reaches the threshold value of the movement amount, the display control unit 31 sequentially removes the regions included in the compositing target image 54 in order from the smallest area.

For example, among the text 82, the wavy line 83, and the polka dot 84 included in the compositing target image 54, the area of each of the three wavy lines included in the wavy line 83 is the largest. The area of the text 82 is the second largest, and the area is increased in order of the text 82A of “P”, the text 82C of “N”, the texts 82B and 82E of “A”, and the text 82D of “D”. The area of each of the plurality of dots included in the polka dot 84 is the smallest. Thus, as illustrated in FIG. 14, in a case where the slider 91B is moved to the right side, the display control unit 31 first removes the polka dot 84 from the compositing target image 54. In a case where the slider 91B is further moved to the right side from this state as illustrated in FIG. 15, the display control unit 31 removes the text 82A of “P” in the text 82 from the compositing target image 54. In a case where the slider 91B is further moved to the right side from this state, the display control unit 31 removes texts from the compositing target image 54 in order from the smallest area. Last, as illustrated in FIG. 16, the display control unit 31 completely removes the text 82 and sets a state where only the wavy line 83 having the largest area among the plurality of regions included in the compositing target image 54 is displayed.

In a case where the slider 91B is moved in the leftward direction, the determination in step S210 results in a negative determination, and a transition is made to step S214.

In step S214, the display control unit 31 sequentially restores the temporarily removed regions in order of area based on the operation amount of the user U, in other words, the movement amount of the slider 91B. In the case of restoring the temporarily removed regions, the plurality of removed regions may be sequentially restored in order from the largest area, and as a method thereof, the opposite operation to the operation of removing the regions may be performed.

Next, in step S216, the main control unit 26 determines whether or not to finish the noise removal mode. In the present embodiment, the user U who completes removal of the noise provides an instruction to finish the noise removal mode by touching the noise removal button 90 again using one finger. In the present embodiment, in a state illustrated in FIG. 14 where the polka dot 84 is removed from the compositing target image 54 by moving the slider 91B, the user U provides an editing instruction for finishing the noise removal mode by touching the noise removal button 90 using one finger.

The main control unit 26 determines whether or not the editing instruction for finishing the noise removal mode is received. In a case where the main control unit 26 does not receive the editing instruction for finishing the noise removal mode, the determination in step S216 results in a negative determination, and a return is made to step S204 to repeat processing of steps S204 to S214. In a case where the main control unit 26 receives the editing instruction for finishing the noise removal mode, the determination in step S216 results in a positive determination, and the noise removal mode is finished.

In a case where the areas of the plurality of regions included in the compositing target image 54 are the same, or in a case where only one region is included in the compositing target image 54, for example, a form in which the regions included in the compositing target image 54 are not completely removed may be available in the noise removal mode. In addition, for example, a form in which the regions included in the compositing target image 54 are completely removed at once may be available in the noise removal mode. In addition, for example, a form of displaying information representing an alert to the user without transitioning to the noise removal mode may be available.

In the display state illustrated in FIG. 11, in a case where the editing instruction received by the main control unit 26 is not the editing instruction provided by operating the noise removal button 90, the determination in step S200 results in a negative determination, and a transition is made to step S218.

In step S218, the main control unit 26 determines whether or not the received editing instruction is an editing instruction provided by operating the eraser button 92. In the case of the editing instruction provided by operating the eraser button 92, step S218 results in a positive determination, and a transition is made to step S220. In this case, the portable terminal 10 is set to an eraser mode. In the eraser mode, the display control unit 31 removes a part or all of the plurality of regions in the compositing target image 54 displayed on the touch panel display 12 from the compositing target image 54.

In step S220, the display control unit 31 displays an eraser tool 93 on the selection image 56 as illustrated in FIG. 17. The eraser tool 93 includes an eraser list 93A and erasers 93B.

The eraser list 93A is a list of the sizes of the erasers 93B and includes images of a plurality of erasers 93B having different sizes. The user U provides an instruction to set the size of the eraser 93B to be used for removal by touching the image of the eraser 93B having the size selected in accordance with the size or the like of the region desired to be removed using one finger. The user U provides an operation instruction for providing an instruction to set a starting position for applying the eraser 93B by touching the region desired to be removed again using one finger among the regions included in the compositing target image 54 displayed on the touch panel display 12.

In step S222, the main control unit 26 determines whether or not the operation instructions for the size of the eraser 93B and the starting position for applying the eraser 93B are provided. In a case where the main control unit 26 does not receive the operation instructions, the determination in step S222 results in a negative determination, and a transition is made to step S226. In a case where the main control unit 26 receives the operation instructions, the determination in step S222 results in a positive determination, and a transition is made to step S224. In a case where the operation instructions for the size and the starting position of the eraser 93B are received, the main control unit 26 outputs information about the size and the starting position of the eraser 93B to the display control unit 31. In the present embodiment, information representing the position of the eraser 93B, that is, coordinate information representing the position of the eraser 93B, is input into the display control unit 31 from the main control unit 26 as information about the editing instruction. The display control unit 31 derives the position of the eraser 93B based on the coordinate information representing the position of the eraser 93B.

In step S224, the display control unit 31 displays the eraser 93B corresponding to the size input from the main control unit 26 at the position corresponding to the input coordinate information. As one example, in the present embodiment, as illustrated in FIG. 17, the eraser 93B having a rectangular shape and the size as instructed by the user U is displayed at the starting position as instructed by the user U.

The user U moves the position of the eraser 93B by performing a gesture of touching the displayed eraser 93B using one finger and swiping a range within which the eraser 93B is desired to be applied. In a case where the eraser 93B is moved, the display control unit 31 removes the images of the regions of the compositing target image 54 in accordance with movement of the eraser 93B. In the example illustrated in FIG. 18, the display control unit 31 sequentially removes the part of the wavy line 83 on which the image of the eraser 93B is superposed from the compositing target image 54 in accordance with the user U moving the eraser 93B on the wavy line 83 displayed on the touch panel display 12.

Next, in step S226, the main control unit 26 determines whether or not to finish the eraser mode. In the present embodiment, the user U who completes removal of an unnecessary part provides an instruction to finish the eraser mode by touching the eraser button 92 again using one finger. In the present embodiment, in a state illustrated in FIG. 19 where the wavy line 83 is removed from the compositing target image 54 by moving the eraser 93B, the user U provides an editing instruction for finishing the eraser mode by touching the eraser button 92 using one finger.

The main control unit 26 determines whether or not the editing instruction for finishing the eraser mode is received. In a case where the main control unit 26 does not receive the editing instruction for finishing the eraser mode, the determination in step S226 results in a negative determination, and a return is made to step S222 to repeat processing of steps S222 and S224. In a case where the main control unit 26 receives the editing instruction for finishing the eraser mode, the determination in step S226 results in a positive determination, and the eraser mode is finished.

Even in the eraser mode, a form of enabling the part of the temporarily removed region to be restored until the eraser mode is finished may be available in the same manner as the noise removal mode.

In the display state illustrated in FIG. 11, in a case where the editing instruction received by the main control unit 26 is neither the editing instruction provided by operating the noise removal button 90 nor the editing instruction provided by operating the eraser button 92, the determination in step S218 results in a negative determination, and a transition is made to step S228.

In step S228, the main control unit 26 determines whether or not the received editing instruction is an editing instruction provided by operating the color change button 94. In the case of the editing instruction provided by operating the color change button 94, step S228 results in a positive determination, and a transition is made to step S230. In this case, the portable terminal 10 is set to a color change mode. In the color change mode, the compositing unit 32B changes the color of the compositing target image 54 displayed on the touch panel display 12.

In step S230, the compositing unit 32B displays a color palette 95 on the selection image 56 as illustrated in FIG. 20. A plurality of colors are arranged in the color palette 95. In a case where the user U provides an editing instruction for changing the color of the text 82, for example, a color change instruction is provided by performing a gesture of tapping a desired color from the plurality of colors arranged in the color palette 95 using one finger.

In step S232, the main control unit 26 determines whether or not the color change instruction for the compositing target image 54 is received. In a case where the main control unit 26 does not receive the color change instruction, the determination in step S232 results in a negative determination, and a transition is made to step S236. In a case where the color change instruction for the compositing target image 54 is received, the determination in step S232 results in a positive determination, and a transition is made to step S234. Information representing the color change instruction received by the main control unit 26 is output to the compositing unit 32B.

Next, in step S234, the compositing unit 32B changes the color of the compositing target image 54 displayed on the touch panel display 12 to the color corresponding to the color change instruction input from the main control unit 26. In the example illustrated in FIG. 21, a state where the color of the text 82 is changed to white by the user U providing an editing instruction of tapping white 95W arranged in the color palette 95 using a finger is illustrated.

Next, in step S236, the main control unit 26 determines whether or not to finish the color change mode. In the present embodiment, the user U who sets the color of the text 82 to the desired color provides an editing instruction for finishing the color change mode by touching the color change button 94 again using one finger.

The main control unit 26 determines whether or not the editing instruction for finishing the color change mode is received. In a case where the main control unit 26 does not receive the editing instruction for finishing the color change mode, the determination in step S236 results in a negative determination, and a return is made to step S232 to repeat processing of steps S232 and S234. In a case where the main control unit 26 receives the editing instruction for finishing the color change mode, the determination in step S236 results in a positive determination, and the color change mode is finished.

A form of changing the color of the text 82 which is the compositing target image 54 using the color palette 95 in the color change mode of the present embodiment is described. However, a method of changing the color of the compositing target image 54 is not limited to a method using the color palette 95. For example, a form of displaying a color switching button (not illustrated) on the selection image 56 and changing between a plurality of predetermined colors such as white and black, white and red, or white, black, and red in accordance with the number of taps of the color switching button in a case where the user U taps the color switching button using a finger may be available. For example, the color change of the compositing target image 54 is performed for the purpose of avoiding the compositing target image 54 that is difficult to see due to an overlap in hue between the color of the compositing target image 54 and the color of the background part of the selection image 56. Alternatively, the color change may be performed for the purpose of changing the color of the compositing target image 54 in accordance with the color of the background based on the sensitivity or the like of the user U.

In the display state illustrated in FIG. 11, in a case where the editing instruction received by the main control unit 26 is neither the editing instruction provided by operating the noise removal button 90, the editing instruction provided by operating the eraser button 92, nor the editing instruction provided by operating the color change button 94, the determination in step S228 results in a negative determination, and a transition is made to step S230. That is, in a case where the editing instruction received by the main control unit 26 is an editing instruction provided by operating the shape editing button 96, a transition is made to step S238. In this case, the portable terminal 10 is set to a shape editing mode. In the shape editing mode, the compositing unit 32B receives an editing instruction for at least one of the display position, the display attitude, or the display size of the compositing target image 54 displayed on the touch panel display 12.

FIG. 22 illustrates one example of a case where the display position of the text 82 which is the compositing target image 54 is moved. In the example illustrated in FIG. 22, one example of a state where the image processing unit 32 moves the display position of the text 82 downward (closer to the operation switch 16) is illustrated. In a case where the user U provides the editing instruction for moving the display position, a gesture of sliding a finger in a desired direction of movement in a state where the text 82 is touched using one finger on the touch panel display 12 is performed.

FIG. 23 illustrates one example of a case where the display size of the text 82 which is the compositing target image 54 is increased. In a case where the user U provides the editing instruction for increasing or decreasing the display size, for example, a gesture of pinching out or pinching in is performed. In a case where pinching out is performed in a state where the top and the bottom or the left and the right of the text 82 are touched using two fingers, the display size of the text 82 is increased. In a case where pinching in is performed, the display size of the text 82 is decreased.

FIG. 24 illustrates one example of a case where the display attitude of the text 82 which is the compositing target image 54 is rotated. In a case where the user U provides the editing instruction for rotating the display attitude, a gesture of rotating two fingers while maintaining an interval between the two fingers in a state where the top and the bottom or the left and the right of the text 82 are touched using the two fingers on the touch panel display 12 is performed.

The main control unit 26 receives such a gesture performed on the compositing target image 54 as the editing instruction for the shape of the compositing target image 54. In step S238, the main control unit 26 determines whether or not the editing instruction for the shape of the compositing target image 54 is received. In a case where the main control unit 26 does not receive the editing instruction for the shape of the compositing target image 54, the determination in step S238 results in a negative determination, and a transition is made to step S242. In a case where the main control unit 26 receives the editing instruction for the shape of the compositing target image 54, the determination in step S238 results in a positive determination, and a transition is made to step S240. The main control unit 26 outputs information about the received editing instruction to the compositing unit 32B.

Next, in step S240, the compositing unit 32B edits the compositing target image 54 in the selection image 56 as described above based on the information about the editing instruction input from the main control unit 26.

Next, in step S242, the main control unit 26 determines whether or not to finish the shape editing mode. In the present embodiment, the user U who sets the shape of the text 82 to a desired shape provides an editing instruction for finishing the shape editing mode by touching the shape editing button 96 again using one finger.

The main control unit 26 determines whether or not the editing instruction for finishing the shape editing mode is received. In a case where the main control unit 26 does not receive the editing instruction for finishing the shape editing mode, the determination in step S242 results in a negative determination, and a return is made to step S238 to repeat processing of steps S238 and S240. In a case where the main control unit 26 receives the editing instruction for finishing the shape editing mode, the determination in step S242 results in a positive determination, and the shape editing mode is finished.

In a case where the noise removal mode is finished by processing of step S216, the eraser mode is finished by processing of step S226, the color change mode is finished by processing of step S236, or the shape editing mode is finished by processing of step S242, the compositing target image editing processing is finished. By finishing the compositing target image editing processing, step S124 of the composited imaging processing is finished, and a transition is made to step S126.

In a case where editing of the compositing target image 54 is finished, the user U taps the shutter button 70 using a finger. In a case where the shutter button 70 is tapped, the main control unit 26 receives a tap operation as a storage instruction for the composite image.

In step S126, the main control unit 26 determines whether or not the storage instruction for the composite image is received. In a case where the main control unit 26 does not receive the storage instruction for the composite image, the determination in step S126 results in a negative determination, and a return is made to step s122 to repeat processing of steps S122 and S124.

In a case where the main control unit 26 receives the storage instruction for the composite image, the determination in step S126 results in a positive determination, and a transition is made to step S128.

The main control unit 26 outputs information about the received storage instruction for the composite image to the compositing unit 32B. In a case where the information about the storage instruction for the composite image is input into the image processing unit 32 from the main control unit 26, the image processing unit 32 confirms the selection image 56 captured at the timing of the tap operation performed on the shutter button 70 and confirms the display position and the like of the compositing target image 54 in the confirmed selection image 56. The compositing unit 32B composites the compositing target image 54 of which the display position and the like are confirmed in the confirmed selection image 56 and outputs the composite image to the image memory 17A as a composite image for storage.

Next, in step S128, the image processing unit 32 stores the composite image. Specifically, the image processing unit 32 stores the composite image by performing compression processing on the composite image for storage output to the image memory 17A and recording the composite image after compression processing in the user region 28 of the storage device 18 or the memory card 29.

Next, in step S130, the main control unit 26 determines whether or not to finish the composited imaging mode. In the present embodiment, in a case where the main control unit 26 receives an operation instruction provided by the user U operating the operation switch 16 or the like for finishing the composited imaging mode, the composited imaging mode is finished. Thus, in a case where the main control unit 26 does not receive the operation instruction for finishing the composited imaging mode, the determination in step S130 results in a negative determination, and a return is made to step S100 to repeat processing of steps S100 to S128. In a case where the main control unit 26 receives the operation instruction for finishing the composited imaging mode, the determination in step S130 results in a positive determination, and the composited imaging mode is finished.

FIG. 25 illustrates a diagram summarizing the composited imaging processing in the portable terminal 10 of the present embodiment. As illustrated in FIG. 25, the portable terminal 10 comprises the extraction unit 32A and the display control unit 31. The extraction unit 32A extracts a part of the display image 50 displayed on the touch panel display 12, as the extraction image used as the compositing target image 54. The display control unit 31 removes at least one of the plurality of regions in order of area based on the operation amount of the operation input by the user U in a case where the plurality of regions having different areas are included in the extraction image used as the compositing target image 54.

That is, in the portable terminal 10 of the present embodiment, in a case where an unnecessary region such as the noise is included in the extracted extraction image as the compositing target image 54, it is possible not to include the unnecessary region in the compositing target image 54 by removing at least one of the plurality of regions in order of area based on the operation amount of the operation input by the user U.

For example, in general, the region of the noise included in the extraction image tends to have a smaller area than the region desired to be set as the compositing target image 54 by the user U. In addition, for example, in a case where the contrast between the unnecessary region such as the background and the region desired to be set as the compositing target image 54 by the user U is small, the unnecessary region such as the background may be included in the extraction image. In this case, the unnecessary region tends to have a larger area than the region desired to be set as the compositing target image 54 by the user U. In such a case, it is possible not to include the unnecessary region in the compositing target image 54 by removing at least one of the plurality of regions included in the extraction image in order of area. In the portable terminal 10 of the present embodiment, such removal can be performed based on the operation amount of the operation input by the user U.

Accordingly, according to the portable terminal 10 of the present embodiment, the operability of the user U for removing the noise included in the extraction image which is extracted from the display image 50 and used as the compositing target image 54 is improved, and the noise can be easily removed.

As illustrated in FIG. 25, the portable terminal 10 of the present embodiment further comprises the compositing unit 32B, sets the extraction image displayed on the touch panel display 12 as the compositing target image 54, and generates the composite image in which the compositing target image 54 is composited in the selection image 56 selected by the user U. Thus, in the portable terminal 10 of the present embodiment, a composite image desired by the user U can be easily generated.

In the portable terminal 10 of the present embodiment, the noise removal tool 91 for allowing the user U to input an operation for removing the unnecessary region from the extraction image is displayed on the touch panel display 12. Accordingly, the user U can remove the noise included in the extraction image by an easily perceivable and simpler operation.

In the portable terminal 10 of the present embodiment, a part or the entirety of the region as instructed by the user is further removed from the extraction image using the eraser tool 93. In the portable terminal 10 of the present embodiment, the noise or the like that is not removed in order of area among the plurality of regions included in the extraction image can be removed using the eraser tool 93. Accordingly, the portable terminal 10 of the present embodiment can deal with various types of noise and thus, can set the extraction image (compositing target image 54) to be an image including a more appropriate region.

As illustrated in FIG. 25, in the portable terminal 10 of the present embodiment, the display control unit 31 displays the specifying frame 60B for specifying the specified region 52, which is a partial region in the display image 50, and the color designation mark 62 for designating the reference color from the colors included in the image of the specified region 52 in the specifying frame 60B in superposition with the display image 50. The extraction unit 32A extracts an image corresponding to the reference color designated by the color designation mark 62 from the image of the specified region 52 in the specifying frame 60B, as the extraction image used as the compositing target image 54.

According to the portable terminal 10 of the present embodiment, in the case of designating an image to be set as the compositing target image 54, the user U may superpose the color designation mark 62 on the color of the image desired to be set as the compositing target image 54. Thus, the user U does not need to directly designate the image to be set as the compositing target image 54 from a plurality of images included in the display image 50. For example, the user U does not need to touch the region of the image to be set as the compositing target image 54 using one finger or perform a gesture such as surrounding the entire region by sliding one finger. Thus, according to the portable terminal 10 of the present embodiment, since the image to be set as the compositing target image 54 can be designated without performing an operation on the touch panel display 12, for example, the image to be set as the compositing target image 54 can be designated even using one hand holding the portable terminal 10. Accordingly, according to the portable terminal 10 of the present embodiment, the operability is further improved, and composited imaging corresponding to various scenes can be performed.

According to the portable terminal 10 of the present embodiment, even in a case where the compositing target image 54 has a complex shape, the compositing target image 54 can be appropriately extracted from the specified region 52 by a simple operation. Accordingly, according to the portable terminal 10 of the present embodiment, creation of the composite image is simplified, and the operability of the user U related to compositing is improved.

In the portable terminal 10 of the present embodiment, the relative positional relationship between the specifying frame 60B and the color designation mark 62 is predetermined. Thus, in the portable terminal 10 of the present embodiment, since both of the position of the specifying frame 60B and the position of the color designation mark 62 may not be designated by the user U, the operability of the user U is further improved.

In the portable terminal 10 of the present embodiment, the specifying frame 60B can be enlarged and reduced. In addition, in the portable terminal 10 of the present embodiment, the specifying frame 60B can be moved. For example, the position of the compositing target image 54 with respect to the display image 50 may inevitably be a biased position due to restriction of an imaging position. In addition, for example, images not desired to be included in the compositing target image 54 may be spread in the display image 50. Even in such a case, since the specifying frame 60B can be enlarged and reduced in the portable terminal 10 of the present embodiment, a desired image desired to be set as the compositing target image 54 by the user U can be appropriately included within the range of the specifying frame 60B, that is, the specified region 52, in the display image 50. In addition, in the portable terminal 10 of the present embodiment, since the specifying frame 60B can be moved, a desired image desired to be set as the compositing target image 54 by the user U can be appropriately included within the range of the specifying frame 60B, that is, the specified region 52, in the display image 50.

In the portable terminal 10 of the present embodiment, the reference color is displayed in the indicator 60A having a larger area than the color designation mark 62. The user U can check the reference color designated by the color designation mark 62 from the indicator 60A. Thus, for example, even in a case where the color designation mark 62 is small, the reference color can be easily checked.

In the portable terminal 10 of the present embodiment, gradation of the entire specified region 52 of the specifying frame 60B is quantified, and an image in which the numerical value of gradation is within the reference color range including the numerical value of gradation corresponding to the reference color is extracted as the compositing target image 54. In the portable terminal 10 of the present embodiment, since the compositing target image 54 can be extracted from the specified region 52 based on the numerical value obtained by quantifying gradation, the compositing target image 54 can be easily extracted in the portable terminal 10, and a processing load in the portable terminal 10 can be reduced.

Modification Example 1

In the embodiment, a form in which the reference color range in a case where the extraction unit 32A extracts the compositing target image 54 from the specified region 52 is predetermined is described. Meanwhile, in the present modification example, a form in which the reference color range is set by the user U will be described. In the present modification example, a state after regions other than the text 82 are removed from the compositing target image 54 is set for convenience of description.

FIG. 26 illustrates one example of a state where the display control unit 31 performs the live view display of the selection image 56 in which the compositing target image 54 is composited on the touch panel display 12 in step S120 of the composited imaging processing. In the example illustrated in FIG. 26, in order to make the compositing target image 54 (text 82) easy to see, one semi-transparent background image is interposed between the selection image 56 and the compositing target image 54 by the display control unit 31.

In the specified region 52, in a case where a difference in contrast among the images (refer to FIG. 10) of the text 82, the friend T, the background B, the shirt 80, and the polka dot 84 is relatively small, the extraction unit 32A may extract the images of the friend T, the background B, the shirt 80, and the like unlike FIG. 26. For example, in a case where the pixel value of the pixel of the gray scale background B is a value of any of 0 to 127, the extraction unit 32A determines that the color of the pixel of the background B is the same black as the reference color. In this case, the extraction unit 32A extracts the text 82 and the background B as the compositing target image 54. Thus, as illustrated in FIG. 27, the display control unit 31 displays the selection image 56 in which the text 82 and the background B are composited as the compositing target image 54 on the touch panel display 12.

In such a case, in the present modification example, the user U can exclude the background B from the compositing target image 54 by setting the reference color range by setting a threshold value used as a boundary of the reference color range, in other words, a threshold value for determining whether the reference color is white or black. In the present modification example, as illustrated in FIG. 27, for example, the display control unit 31 displays a setting button 73 for setting the threshold value used as the boundary of the reference color range at a lower position on the display screen of the touch panel display 12 as a GUI. By allowing the user U to provide an operation instruction of tapping the setting button 73 using one finger, the display control unit 31 displays a threshold value setting tool 74 as a GUI as illustrated in FIG. 28. The threshold value setting tool 74 includes a slider bar 74A representing colors having pixel values of 0 to 255 and a slider 74B.

The user U changes the position of the slider 74B by performing a gesture of sliding a finger along the slider bar 74A in a state where the user U touches the slider 74B using one finger. In a case where the position of the slider 74B is changed, the extraction unit 32A changes the threshold value used as the boundary of the reference color range to a color indicated by the slider bar 74A corresponding to the changed position, specifically, the pixel value of the pixel of the slider bar 74A designated by the slider 74B. In the example illustrated in FIG. 28, as the position of the slider 74B is moved to the right side, the threshold value used as the boundary of the reference color range is increased and approaches white. As the position of the slider 74B is moved to the left side, the threshold value is decreased and approaches black.

In the case of excluding the background B from the compositing target image 54, the user U moves the slider 74B between the color of the background B and the color of the text 82 as illustrated in FIG. 29. By allowing the user U to move the slider 74B, the threshold value used as the boundary of the reference color range is set to a value between the pixel value of the pixel of the background B and the pixel value of the pixel of the text 82. In this state, the portable terminal 10 can set a state where only the text 82 is included in the compositing target image 54 as illustrated in FIG. 29 by performing the compositing target image extraction processing (refer to FIG. 9) again.

In the present modification example, the threshold value used as the boundary of the reference color range, in other words, a threshold value used as a boundary of contrast between the compositing target image 54 and other images, can be set by the user U.

Accordingly, according to the portable terminal 10 of the present modification example, only an image desired by the user U can be extracted from the specified region 52 as the compositing target image 54 by a simple operation. In addition, since the user U can set the threshold value used as the boundary of the reference color range while seeing the color of the slider bar 74A, the threshold value can be more intuitively set.

The threshold value setting tool 74 is not limited to a form of including the slider bar 74A and the slider 74B. For example, the threshold value setting tool 74 may have a form of including a color space and a pointer designating coordinates of the color space. In this case, a pixel value corresponding to the coordinates of the color space designated by the user U using the pointer is set as the threshold value used as the boundary of the reference color range.

In the embodiment and the present modification example, a form of converting the gray scale pixel into two values and setting one value as the reference color range is described. However, the reference color range is not limited to the present form. For example, a form of setting a range within which the pixel value of the reference color is included as the reference color range using three or more values may be available. In addition, for example, a form of setting a predetermined range from the pixel value of the pixel of the reference color, specifically, a range of ±20 of the pixel value of the reference color, is set as the reference color range may be available.

Modification Example 2

In each form above, a form of designating the color of the text 82 desired to be composited as the reference color using the color designation mark 62 is described. However, designation of the color of the text 82 as the reference color may not be appropriately performed, and the compositing target image 54 may not be appropriately extracted. Regarding such a case, a modification example of a method of designating the color of the text 82 as the reference color will be described in the present modification example.

For example, as illustrated in FIG. 30, in a case where the text 82 is smaller than the color designation mark 62 such that the text 82 is thin, the proportion of the text 82 in the display image 50 surrounded by the color designation mark 62 is smaller than other images (in the example in FIG. 30, the shirt 80). In a case where a plurality of images are included in the display image 50 surrounded by the color designation mark 62, the color of the pixel of the shirt 80 is the reference color in a case where the color of an included image having the highest proportion is set as the reference color. As described above, since the extraction unit 32A determines that the color of the pixel of the shirt 80 is white, the reference color is white. Thus, as illustrated in FIG. 31, the extraction unit 32A extracts each of the friend T, the background B, and the shirt 80, which are determined as being white, as the compositing target image 54.

In such a case, in the present modification example, the user U can set the color of an image desired to be extracted, in the present modification example, the color of the text 82, as the reference color by inverting the reference color. In the present modification example, as illustrated in FIG. 30, for example, the display control unit 31 displays an inversion button 76 for inverting the reference color at a lower position on the display screen of the touch panel display 12 as a GUI. In a case where the user U provides an inversion instruction by tapping the inversion button 76 using one finger, the main control unit 26 receives the inversion instruction and outputs information about the inversion instruction to the extraction unit 32A. In a case where the information about the inversion instruction is input into the extraction unit 32A from the main control unit 26, the extraction unit 32A inverts the color of the reference color determined in step S154 of the compositing target image extraction processing (refer to FIG. 9) and extracts the compositing target image 54 based on the reference color after inversion.

The extraction unit 32A extracts the compositing target image 54 based on the reference color after inversion. In the present modification example, black is the reference color, and the compositing target image 54 is extracted by the extraction unit 32A using the color of the text 82 as the reference color. Thus, as illustrated in FIG. 31, the extraction unit 32A can extract the text 82 as the compositing target image 54.

Accordingly, according to the portable terminal 10 of the present modification example, the compositing target image 54 can be appropriately extracted from the specified region 52 by a simple operation.

A timing at which the extraction unit 32A inverts the reference color is not limited. For example, a form of providing the inversion instruction before providing the extraction instruction for the compositing target image 54 in a case where the text 82 is thin and the user U feels that the color designation mark 62 cannot be easily set on the text 82, or in a case where the user U sees the color displayed in the indicator 60A and feels that the color is different from the color of the text 82 may be available. Alternatively, a form in which the user U who notices that the compositing target image 54 is not a desired image after the live view display of the selection image 56 in which the compositing target image 54 is composited provides the inversion instruction may be available.

In the present modification example, a form of appropriately extracting the compositing target image 54 by inverting the reference color in a case where the compositing target image 54 cannot be appropriately extracted is described. However, a method for appropriately extracting the compositing target image 54 is not limited to the present modification example. For example, a form of inverting a relationship between an image extracted as the compositing target image 54 and an image that is not extracted may be available. In the case of the present modification example, in a case where white is set as the reference color as described above, the extraction unit 32A extracts each of the friend T, the background B, and the shirt 80 and does not extract the text 82. By inverting (changing) a relationship of whether or not to perform extraction, the extraction unit 32A can extract the text 82 and may not extract each of the friend T, the background B, and the shirt 80.

Modification Example 3

In the present modification example, a modification example of the specifying frame 60B of the indicator-included specifying frame 60 will be described. The “frame” of the specifying frame 60B may be a frame that can clearly present the range of the specified region 52.

For example, as illustrated in FIG. 32A to FIG. 32C, a part of a line surrounding the specified region 52 may be cut in the specifying frame 60B. The specifying frame 60B illustrated in FIG. 32A and FIG. 32B has a shape of a so-called bracket. Even in the forms illustrated in FIG. 32A and FIG. 32B, the specifying frame 60B clearly presents the range of the specified region 52 as a range provided with hatching by diagonal lines in the drawings. The specifying frame 60B in FIG. 32C has a shape of a so-called corner bracket. Even in the form illustrated in FIG. 32C, the specifying frame 60B clearly presents the range of the specified region 52 as a range provided with hatching by diagonal lines in the drawing.

In addition, for example, as illustrated in FIG. 32D, the specifying frame 60B may have a mark shape indicating the position of framing Even in the form illustrated in FIG. 32D, the specifying frame 60B clearly presents the range of the specified region 52 as a range provided with hatching by diagonal lines in the drawing.

The specifying frame 60B is not limited to a rectangular shape and may have other shapes. For example, as illustrated in FIG. 32E and FIG. 32F, the specifying frame 60B may be a frame having a circular shape.

Modification Example 4

In the present modification example, a modification example of the indicator 60A of the indicator-included specifying frame 60 will be described.

A form of arranging the indicator 60A on the frame of the specifying frame 60B and handling the indicator 60A and the specifying frame 60B as the indicator-included specifying frame 60 as a single unit is described above. Alternatively, the indicator 60A and the specifying frame 60B may be separately handled.

In the case of separately handling the indicator 60A and the specifying frame 60B, for example, as illustrated in FIG. 33A, the display control unit 31 may display the indicator 60A at a position separated from the specifying frame 60B such that the indicator 60A is displayed at a position above the specifying frame 60B in the display image 50.

The shape of the indicator 60A is also not particularly limited. In each form above, a case where the shape of the indicator 60A is a circular shape is described. Alternatively, for example, as illustrated in FIG. 33B, the shape of the indicator 60A may be a rectangular shape. In addition, the shape of the indicator 60A and the shape of the color designation mark 62 may be set to the same shape, or the shape of the indicator 60A and the shape of the specifying frame 60B may be set to the same shape.

Modification Example 5

In the present modification example, a modification example of the color designation mark 62 will be described. A form in which the color designation mark 62 is a mark having a shape of a circular ring surrounding the display image 50 is described above. However, the shape of the color designation mark 62 is not limited to a circular ring.

For example, as illustrated in FIG. 34A, the shape of the color designation mark 62 may be a circle or an image of a so-called filled circle. In this case, the color of the display image 50 in a part on which the color designation mark 62 is superposed is designated as the reference color.

In addition, for example, as illustrated in FIG. 34B, the shape of the color designation mark 62 may be a rectangular shape. In addition, for example, the shape of the color designation mark 62 and the shape of the specifying frame 60B may be set to the same shape.

Modification Example 6

While a form in which the display image 50 and the selection image 56 are live view images of which the live view display can be performed is described above, at least one of the display image 50 or the selection image 56 may not be a live view image. That is, at least one of the display image 50 or the selection image 56 may be an image read out from captured images (hereinafter, referred to as storage images) that are captured in the past and stored in the memory card 29, the user region 28 of the storage device 18, or the like.

First, a case where the display image 50 is not a live view image and is a storage image will be described. FIG. 35A illustrates a flowchart of composited imaging processing in a case where the display image 50 is a storage image. The composited imaging processing illustrated in FIG. 35A includes processing of steps S101A to S101C instead of step S100 of the composited imaging processing illustrated in FIG. 6.

In step S101A, the display control unit 31 creates a list of stored storage images and displays the list on the touch panel display 12. Examples of the list of storage images include a form of linearly displaying thumbnail images or the like of the storage images.

The user U refers to the list of storage images and provides an operation instruction for selecting a storage image in which the image desired to be set as the compositing target image 54 is included. As one example, in the present modification example, the operation instruction provided by the user U for selecting the storage image is provided by allowing the user to touch the thumbnail image or the like of the storage image displayed on the touch panel display 12 using one finger. In a case where the main control unit 26 receives the operation instruction for selecting the storage image, the main control unit 26 outputs information about the present operation instruction to the display control unit 31.

Next, in step S101B, the display control unit 31 determines whether or not the storage image is selected by the user. The determination in step S101B results in a negative determination until the information about the operation instruction for selecting the storage image is input from the main control unit 26. In a case where the information about the operation instruction for selecting the storage image is input from the main control unit 26, the determination in step S101B results in a positive determination, and a transition is made to step S101C.

In step S101C, the display control unit 31 displays one storage image corresponding to the information about the operation instruction on the touch panel display 12 as the display image 50 from the stored storage images.

Processing of step S102 and later is the same as the above form. In the case of the present example, the storage image is read out from the memory card 29 or the user region 28 as the display image 50 under control of the main control unit 26. The display image 50 which is read out is recorded in the image memory 17A. The display image 50 read out from the memory card 29 or the user region 28 is in a compressed form. The image processing unit 32 reads out the display image 50 from the image memory 17A and performs decompression processing on the display image 50. The extraction unit 32A extracts the compositing target image 54 from the display image 50 subjected to the decompression processing.

Next, a case where the selection image 56 is not a live view image and is a storage image will be described. FIG. 35B illustrates a flowchart of composited imaging processing in a case where the selection image 56 is a storage image. The composited imaging processing illustrated in FIG. 35B includes processing of steps S117A and S117B instead of step S116 of the composited imaging processing illustrated in FIG. 6.

In step S117A, the display control unit 31 creates a list of stored storage images and displays the list on the touch panel display 12 in the same manner as step S101A.

The user U refers to the list of storage images and provides an operation instruction for selecting the storage image desired to be set as the selection image 56 in the same manner as the operation instruction for selecting the storage image desired to be set as the compositing target image 54 from the list of storage images described above. In a case where the main control unit 26 receives the operation instruction for selecting the storage image, the main control unit 26 outputs information about the present operation instruction to the display control unit 31.

Next, in step S117B, the display control unit 31 determines whether or not the storage image is selected by the user in the same manner as step S101B. The determination in step S117B results in a negative determination until the information about the operation instruction for selecting the storage image is input from the main control unit 26. In a case where the information about the operation instruction for selecting the storage image is input from the main control unit 26, the determination in step S117B results in a positive determination, and a transition is made to step S118.

Processing of step S118 and later is the same as the above form. In the case of the present example, one storage image corresponding to the information about the operation instruction is read out from the storage images stored in the memory card 29 or the user region 28 as the selection image 56 under control of the main control unit 26. The selection image 56 which is read out is recorded in the image memory 17A. The selection image 56 read out from the memory card 29 or the user region 28 is in a compressed form. The image processing unit 32 reads out the selection image 56 from the image memory 17A and performs the decompression processing on the selection image 56. The compositing unit 32B composites the compositing target image 54 in the selection image 56 subjected to the decompression processing.

In a case where the display image 50 and the selection image 56 are not live view images and are storage images, the composited imaging processing illustrated in FIG. 35A and the composited imaging processing illustrated in FIG. 35B may be combined.

In a case where the captured image in the past can be used as the display image 50, for example, the user U can have the joy of obtaining a composite photograph of a subject and a mark or a character string recalled from the subject in a case where the user U recalls the mark or the character string captured in the captured image captured in the past based on the subject found by the user U at a traveling destination. Conversely, for example, the user U can have the joy of obtaining a composite photograph of a mark or a character string of the current subject and a captured image recalled from the subject in a case where the user U recalls the captured image captured in the past based on the subject of the mark or the character string found by the user U at the traveling destination.

The composite image recorded in the memory card 29 or the user region 28 by performing the composited imaging may be used as at least one of the display image 50 or the selection image 56. By doing so, compositing can be performed a plurality of times. Thus, the joy is further expanded.

As at least one of the display image 50 or the selection image 56, not only the storage image stored in the memory card 29 or the user region 28 but also an image downloaded from a server through the Internet or the like may be used as at least one of the display image 50 or the selection image 56. Even in the case of downloading the image from the server, the image is temporarily recorded in the memory card 29 or the user region 28. Thus, subsequent processing is the same as in the case of using the storage image as at least one of the display image 50 or the selection image 56 from the memory card 29 or the user region 28.

Modification Example 7

While a form in which the display control unit 31 sequentially removes the plurality of regions included in the extraction image used as the compositing target image 54 in order from the smallest area is described in the above form, the order of removing the regions is not limited to the present form as described above. For example, a form of sequential removing in order from the largest area may be available.

In addition, for example, a form of sequential removing in order from the smallest area and sequential removing in order from the largest area may be available. In this case, as illustrated in FIG. 36A, the noise removal tool 91 displayed on the touch panel display 12 by the display control unit 31 includes the slider bar 91A, the slider 91B, and a slider 91C. An operation in a case where the user U operates (moves) the slider 91B along the slider bar 91A is the same as described above. In a case where the user U moves the slider 91C along the slider bar 91A, the display control unit 31 sequentially removes the plurality of regions (in FIG. 36A, regions of the text 82, the wavy line 83, and the polka dot 84) included in the compositing target image 54 in order from the largest area in accordance with the movement amount of movement from the left side to the right side. Whether the order is from the largest area or the smallest area is the only difference, and the method described in the above form may be applied as a specific method of removal.

For example, in a case where the user U moves the slider 91C from the left side to the right side along the slider bar 91A, the region of the wavy line 83 having the largest area among the text 82, the wavy line 83, and the polka dot 84 is removed first from the compositing target image 54, and the compositing target image 54 displayed on the touch panel display 12 is set to a state illustrated in FIG. 36B.

Modification Example 8

In the present modification example, a modification example of a case where a relatively small region such as a region smaller than the noise is included in the region of the extraction image desired to be set as the compositing target image 54 will be described.

For example, a case where the compositing target image 54 is the text 82 as illustrated in FIG. 37 will be described. In the example illustrated in FIG. 37, the display control unit 31 recognizes a text 82F of “

” included in the text 82 of “

” as five regions of 82F₁ to 82F₃, 82F₅, and 82F₆. In this case, the regions 82F₅ and 82F₆ which are voicing marks have relatively small areas and thus, may be removed from the compositing target image 54 relatively early in a case where the slider 91B is moved.

In such a case, as described above, a form in which the display control unit 31 of the present modification example collectively handles regions recognized as one character as one region by recognizing the regions included in the compositing target image 54 and then, performing character recognition processing such as optical character recognition (OCR) processing of converting image data into a set of character codes on the compositing target image 54 may be available.

By collectively handling a plurality of regions as one region, a region desired to be included in the compositing target image 54 by the user U may not be easily removed even in a case where the area of the region is small.

As described above, in the portable terminal 10 of each form above, in a case where an unnecessary region such as the noise is included in the extracted extraction image as the compositing target image 54, it is possible not to include the unnecessary region in the compositing target image 54 by removing at least one of the plurality of regions in order of area based on the operation amount of the operation input by the user U. Accordingly, according to the portable terminal 10 of the present embodiment, the operability of the user U for removing the noise included in the extraction image which is extracted from the display image 50 and used as the compositing target image 54 is improved, and the noise can be easily removed.

In the technology of the present disclosure, each form above can be subjected to various modifications without departing from the gist of the present invention. For example, in extraction of the compositing target image 54 from the display image 50, the subject in which the compositing target image 54 is displayed may be a curved object having a cylindrical shape or the like. In such a case, a form in which the extraction unit 32A performs leveling processing of leveling a curved surface on the compositing target image 54 extracted from the specified region 52 may be available. Such leveling processing may be performed based on an operation instruction provided by the user U or may be automatically performed by the extraction unit 32A by determining the shape of the subject.

In each form above, the portable terminal 10 such as a smartphone is illustratively described as one example of the imaging apparatus. Alternatively, the imaging apparatus may be other than the smartphone and, for example, may be a tablet terminal or an ordinary digital camera which is a dedicated camera apparatus.

An apparatus in which the image processing apparatus according to the present disclosure is incorporated is not limited to the portable terminal 10. For example, a form of incorporation into a general-purpose personal computer or the like may be available, and a form of incorporation into an apparatus not having an imaging function may be available. In the case of incorporation into the apparatus not having the imaging function, the apparatus does not have a live view display function. Thus, both of the display image 50 and the selection image 56 are images which are not live view images, that is, still images.

The image processing program illustrated as the photograph compositing application program as one example may be preinstalled on the storage device 18 when the portable terminal 10 is sold. Alternatively, after the user purchases the portable terminal 10, the user may access the server using the portable terminal 10 and download and install an operation program from the server.

Processing of the composited imaging mode executed by the portable terminal 10 according to the present disclosure is merely one example. Accordingly, removal of unnecessary steps, addition of new steps, or change of the processing order may be available without departing from the gist.

In the embodiment, a combination of a plurality of steps of the composited imaging mode illustrated in FIG. 6 as one example corresponds to one example of an image processing method according to the present disclosure.

In the embodiment, the following various processors can be used as the hardware structure of processing units such as the main control unit, the extraction unit, the compositing unit, and the display control unit executing various types of processing. The various processors include a CPU that is a general-purpose processor functioning as various processing units by executing software (program) and also a programmable logic device (PLD) such as a field-programmable gate array (FPGA) having a circuit configuration changeable after manufacturing, a dedicated electric circuit such as an application specific integrated circuit (ASIC) that is a processor having a circuit configuration dedicatedly designed to execute a specific type of processing, and the like.

The various types of processing may be executed by one of the various processors or may be executed by a combination of two or more processors of the same kind or different kinds (for example, a plurality of FPGAs and a combination of a CPU and an FPGA). Alternatively, a plurality of processing units may be configured with one processor. An example of configuring the plurality of processing units with one processor is a form of using a processor such as a system on chip (SOC) that implements the function of the entire system including the plurality of processing units using one integrated circuit (IC) chip.

Accordingly, various processing units are configured using one or more of the various processors as the hardware structure.

Furthermore, more specifically, an electric circuit (circuitry) in which circuit elements such as semiconductor elements are combined can be used as the hardware structure of the various processors.

The technology of the present disclosure is applied to not only the operation program of the imaging apparatus but also a non-transitory computer readable storage medium (a USB memory, a digital versatile disc (DVD)-read only memory (ROM), or the like) storing the operation program of the imaging apparatus. 

What is claimed is:
 1. An image processing apparatus comprising: a memory; and a processor coupled to the memory and a display, the processor configured to: extract a part of a display image displayed on a display, as an extraction image; and in a case where a plurality of regions having different areas are included in the extraction image, remove at least one of the plurality of regions in order of area based on an operation amount of an operation input by a user.
 2. The image processing apparatus according to claim 1, wherein the processor is further configured to set the extraction image displayed on the display unit as a compositing target image, generate a composite image in which the compositing target image is composited in a selection image selected by the user, and display the composite image on the display unit.
 3. The image processing apparatus according to claim 1, wherein the processor is further configured to display an operation display for allowing the user to input the operation on the display.
 4. The image processing apparatus according to claim 1, wherein the processor is further configured to remove a part or an entirety of a region as instructed by the user in the extraction image.
 5. The image processing apparatus according to claim 1, wherein the processor is further configured to display a specifying frame for specifying a partial region in the display image and a color designation mark for designating a reference color from colors included in an image in the specifying frame, in superposition with the display image, and extract an image corresponding to the reference color designated by the color designation mark from the image in the specifying frame, as the extraction image.
 6. The image processing apparatus according to claim 5, wherein the color designation mark is displayed in the specifying frame, and a relative positional relationship between the specifying frame and the color designation mark is predetermined.
 7. The image processing apparatus according to claim 5, wherein the processor is further configured to receive a size change instruction for enlarging or reducing the specifying frame, and perform control for changing a size of the specifying frame in accordance with the received size change instruction.
 8. The image processing apparatus according to claim 5, wherein the processor is further configured to receive a movement instruction for moving a position of the specifying frame, and perform control for moving the position of the specifying frame in accordance with the received movement instruction.
 9. The image processing apparatus according to claim 5, wherein the processor is further configured to display an indicator that has a larger area than the color designation mark and that represents the reference color.
 10. The image processing apparatus according to claim 5, wherein the processor is further configured to quantify gradation of an entire image in the specifying frame and extract an image in which a numerical value of gradation is within a reference color range including a numerical value of gradation to which the reference color corresponds, as the extraction image.
 11. The image processing apparatus according to claim 10, wherein the processor is further configured to allow the user to set the reference color range.
 12. An imaging apparatus comprising: a camera that images a subject; and the image processing apparatus according to claim
 1. 13. The imaging apparatus according to claim 12, wherein live view display of a display image is performed on the display.
 14. An image processing method executed by a computer, comprising: extracting a part of a display image displayed on a display, as an extraction image; and in a case where a plurality of regions having different areas are included in the extraction image, removing at least one of the plurality of regions in order of area based on an operation amount of an operation input by a user.
 15. A non-transitory computer-readable storage medium storing an image processing program causing a computer to execute a process, the process comprising: extracting a part of a display image displayed on a display, as an extraction image; and in a case where a plurality of regions having different areas are included in the extraction image, removing at least one of the plurality of regions in order of area based on an operation amount of an operation input by a user.
 16. The image processing apparatus according to claim 3, wherein the operation display is a slider, and the operation amount of the operation input by the user is determined based on a position of the slider. 